#!/bin/bash


for name in $(cat /tmp/yhm);do
	if id $name &>/dev/null ;then
		echo "用户$name已存在"
	else
		useradd $name 
		echo "redhat" | passwd --stdin $name &>/dev/null
		echo "用户$name创建完成,初始密码为redhat"
	fi
done


